"""
Project Name : api_automation_framework
File Name : json_demo.py
Author : lldhsds
Date : 2024/12/28 10:56
Description: /json, 返回一个 JSON 格式的响应，通常用于 API 返回的数据格式。
"""

import requests


# GET: /json
# Returns a simple JSON document.
# parameters: None
# response: 200(An JSON document.)

def json_demo():
    headers = {'content-type': 'application/json'}
    response = requests.get('https://httpbin.org/json', headers=headers)
    print(response.status_code)
    print(response.text)
    print(response.headers)

json_demo()
